﻿using Lights.Types;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace Lights.Controls
{
    /// <summary>
    /// Logica di interazione per CollectionViewer.xaml
    /// </summary>
    public partial class CollectionViewer : UserControl
    {
        public static readonly DependencyProperty ItemsSourceProperty;

        public IEnumerable ItemsSource 
        {
            get { return (IEnumerable)GetValue(CollectionViewer.ItemsSourceProperty); }
            set { SetValue(CollectionViewer.ItemsSourceProperty, value); }
        }

        static CollectionViewer()
        {
            CollectionViewer.ItemsSourceProperty = DependencyProperty.Register("ItemsSource", typeof(IEnumerable), typeof(CollectionViewer));
        }

        public IEnumerable SelectedItems
        {
            get { return this.panel.SelectedItems; }
        }

        public CollectionViewer()
        {
            InitializeComponent();
        }
    }
}
